package leyou.search.controller;


import com.leyou.api.R;
import leyou.search.service.EsGoodsSearchService;
import leyou.search.vo.SearchPamarVo;
import leyou.search.vo.SerachResults;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SearchController {

    @Autowired
    EsGoodsSearchService searchService;

      @RequestMapping("/list/page")
      public R SearchPage(@RequestBody  SearchPamarVo pamarVo){
          SerachResults result  =  searchService.search(pamarVo);
          return R.ok().put("data",result);
      }


}
